#!/usr/bin/node

console.log('02-pid is :', process.pid);

//spawm方式调用外部程序

const cp = require('child_process'),
      child = cp.spawn('cat', ['02-spawn-v1.js']);

child.stdout.pipe(process.stdout);
child.stdout.pipe(process.stderr);
